package com.sig.sigandroidDisconnected;


import android.app.Activity;
import android.content.ComponentName;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.util.Log;
import android.view.Menu;

import com.sig.sigandroid.R;
import com.sig.sigandroidDisconnected.LoadDataService.LocalBinder;

public class LoadXMLActivity extends Activity {
	
	private static final String TAG="LoadXML";
	public LoadDataService loadService;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_load_xml);
		
		/*Intent intent=new Intent(this,LoadDataService.class);
		bindService(intent, mConnection, BIND_AUTO_CREATE);
		
		loadService.lodData();*/
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.load_xml, menu);
		return true;
	}
	
	private ServiceConnection mConnection = new ServiceConnection() {

		@Override
		public void onServiceConnected(ComponentName className, IBinder service) {
			// We've bound to LocalService, cast the IBinder and get
			// LocalService instance
			Log.d(TAG, "onServiceConnected");
			LocalBinder binder = (LocalBinder) service;
			loadService = binder.getService();
			Log.d(TAG, "onServiceConnectedOk");
		}

		@Override
		public void onServiceDisconnected(ComponentName arg0) {
			Log.d(TAG, "onServiceDisconnected");
		}
	};

}
